{% extends 'dashboard/dash_base.html' %}

{% block title %}七牛CDN设置{{- ' - ' -}}{{- Setting.get_setting('blogtitle', 'Plog') -}}{% endblock %}
{% block body_class %}dashboard-setting dashboard-setting-reading{% endblock %}

{% block page_headtitle %}
<div class="page-title">
    <div class="title-env">
        <h1 class="title">七牛CDN设置</h1>
        <p class="description">网站静态文件CDN相关选项</p>
    </div>
    <div class="breadcrumb-env">
        <ol class="breadcrumb">
            <li>
                <a href="{{ url_for('dashboard.dashboard_home') }}">
                    <span class="glyphicon glyphicon-home"></span>控制板
                </a>
            </li>
            <li>
                <a href="{{ url_for('dashboard.settings') }}">设置</a>
            </li>
            <li>
                七牛CDN设置
            </li>
        </ol>
    </div>
    <div class="clearfix"></div>
</div>
{% endblock %}

{% block page_content %}
<section class="content">
    <form id="setting-cdn" class="" method="post">
        {{ form.hidden_tag() }}
        <fieldset>
            <div class="form-group">
                <label for="qiniu-domain">七牛域名</label>
                <input id="qiniu-domain" name="cdn[qiniu_domain]" type="url" class="url-input ember-view form-control" value="{{ Setting.get_setting('qiniu_domain', '') }}">
                <p class="help-block">设置为七牛提供的测试域名或者在七牛绑定的域名,域名开头需要加上 <strong>http://</strong></p>
            </div>
            <div class="form-group">
                <label for="qiniu-spacename">七牛空间名</label>
                <input id="qiniu-spacename" name="cdn[qiniu_spacename]" type="text" class="text-input ember-view form-control" value="{{ Setting.get_setting('qiniu_spacename', '') }}">
                <p class="help-block">设置为你在七牛提供的空间名</p>
            </div>
            <div class="form-group">
                <label for="qiniu-accesskey">七牛Access Key</label>
                <input id="qiniu-accesskey" name="cdn[qiniu_accesskey]" type="text" class="text-input ember-view form-control" value="{{ Setting.get_setting('qiniu_accesskey', '') }}">
            </div>
            <div class="form-group">
                <label for="qiniu-secretkey">七牛Secret Key</label>
                <input id="qiniu-secretkey" name="cdn[qiniu_secretkey]" type="text" class="text-input ember-view form-control" value="{{ Setting.get_setting('qiniu_secretkey', '') }}">
            </div>
        </fieldset>
        <div class="submit-btn-env">
            {{ form.submit(class="btn btn-info", value="保存") }}
        </div>
    </form>
</section>
{% endblock %}